-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: refactor oci/helm tests for registryproviders #1113
test: refactor oci/helm tests for registryproviders #1113
Conversation
d017558
to
113f0e7
Compare
/assign @karlkfi |
113f0e7
to
ab3a222
Compare
/cc @nan-yu |
746ac74
to
9340efa
Compare
/retest |
@@ -499,6 +499,28 @@ func (g *Repository) Copy(sourceDir, destDir string) error { | |||
return err | |||
} | |||
|
|||
// UseHelmChart copies the files from the provided helm chart to the current | |||
// repository. | |||
func (g *Repository) UseHelmChart(chart string) error { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is not the same repository when switching from Git to Helm. I feel like it makes more sense to copy the files when building the Helm chart.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea here is that we can use the same Repository
object as a primitive for creating all types of artifacts (git, oci, helm). There are tests which use the pattern of adding individual files for a helm chart and pushing it, this is just intended as a convenience function to copy over the premade helm charts from the local directory.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had the same confusion looking at the Repository. I expected two interfaces, one for helm and one for OCI. Having them in the same interface feels like leaking implementation details.
7578a1e
to
753a645
Compare
753a645
to
f6e4b18
Compare
This refactors the existing helm-sync/oci-sync tests which push artifacts to use the new RegistryProvider interface. This delivers a few benefits: - minimize duplicate test scaffolding - enable running these tests without GKE/AR - enable running these tests with the presubmits in kind
f6e4b18
to
d1df314
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
thanks for cleaning it up a bit. we can always clean it up more later if we feel like it.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: karlkfi The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
c0f0c59
into
GoogleContainerTools:main
This refactors the existing helm-sync/oci-sync tests which push artifacts to use the new RegistryProvider interface. This delivers a few benefits: